<template>
	<div>
		<h2>查看积分记录</h2>
		<el-table :data="recordDataArray" height="250" style="width: 100%">
			<el-table-column prop="id" label="序号" width="180" />
			<el-table-column prop="integralChange" label="数量" width="180" />
			<el-table-column prop="integralSource" label="操作类型" />
			<el-table-column prop="modifyTime" label="操作时间" />
			<el-table-column prop="integralBalance" label="余额" />
			
			
		</el-table>
		<div>
			<!-- 分页 -->
			<el-pagination background layout="prev, pager, next" :total="1000">
			</el-pagination>
		</div>
	</div>
</template>

<script scoped>
	// import qs from 'qs'

	export default {
		name: "IntegralRecord",
		data() {
			return {
				recordDataArray:[
					// {
					// 	id:'1',
					// 	quantity:'11',
					// 	type:'开盲盒',
					// 	date:'2020-01-01',
					// 	balance:'6',
					// },
				],
				
				
			}
		},
		mounted() { //挂载时执行的方法
			this.showIntegralRecord();
		},
		methods: {
			getUserInfo() {
				console.log("执行getUserInfo()");

			},
			showIntegralRecord() { //查看积分记录
				this.$axios.get('/api/integral/record/getListByUserId')
					.then(res => {
						// console.log("data=" + res)
						this.recordDataArray = res.list;
					}).catch(error => {
						console.log("error:" + error)
					})
			}

		}
	}
</script>

<style>
</style>
